export default {
  state: {
    // 设计盘当前菜单
    activeDesignMenuIndex: 0,

    // 设计盘当前组件
    activeDesignComponent: '',

    // 所有自定义图片
    designImages: [
      {
        url: require('../../assets/imgs/custom_item_1.png'),
        width: 60,
        height: 40,
        left: 0,
        top: 0,
      }
    ],
    // 当前选中自定义图索引
    activeImageIndex: -1
  },
  getters: {
    getActiveDesignMenuIndex(state) {
      return state.activeDesignMenuIndex
    },
    getActiveDesignComponent(state) {
      return state.activeDesignComponent
    },
    getDesignImages(state) {
      return state.designImages
    },
    getActiveImageIndex(state) {
      return state.activeImageIndex
    }
  },
  mutations: {
    setActiveDesignMenuIndex(state, data) {
      state.activeDesignMenuIndex =  data || 0
    },
    setActiveDesignComponent(state, data) {
      state.activeDesignComponent =  data
    },
    setDesignImages(state, data) {
      state.designImages =  data || []
    },
    setActiveImageIndex(state, data) {
      state.activeImageIndex =  data
    }
  },
  actions: {
  },
}